package com.burpee.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.burpee.dao.ChoiceDao;
import com.burpee.ui.Choice;

@Service(value="choiceService")
public class ChoiceServiceImpl implements ChoiceService {

	@Autowired
	ChoiceDao choiceDao;
	public List<Choice> list() {
		
		return choiceDao.list();
	}

	public Choice view(Choice choice) {
		
		return choiceDao.view(choice);
	}

	public boolean add(Choice choice) {
		if(choiceDao.add(choice) > 0){
			return true;
		}
		else{

			return false;
		}
	}

	public boolean modify(Choice choice) {
		if(choiceDao.modify(choice) > 0){
			return true;
		}
		else{

			return false;
		}
	}

	public boolean remove(Choice choice) {
		if(choiceDao.remove(choice) > 0){
			return true;
		}
		else{

			return false;
		}
	}

}
